package com.test.daoImp;

import com.test.dao.IUpdateDao;
import com.test.database.DataBase;
import com.test.entity.WriteEntity;

public class UpdateDaoImp implements IUpdateDao {

	public boolean update_tb_article_info(WriteEntity data) {
		boolean flag=false;
		
		int id = data.getId();
		String text = data.getText();
		String title = data.getTitle();
		String name = data.getName();
		String type = data.getType();
		String expectResults = data.getExpectResults();
		String actualResults = data.getActualResults();
		System.out.println("检查pwd  text 是否传入" +text);

		DataBase db = new DataBase("stest");
		
		String sql = "update tb_article_info set title=?,name=?,type=?,text1=?,expectResults=?,actualResults=? where id=?";
		Object[] objs = { title, name, type, text, expectResults, actualResults,id };

		flag = db.myUpdate(sql, objs);
		System.out.println("执行更新数据完毕");
		return flag;
		
	}
}
